#ifndef READENERGYWIDGET_H
#define READENERGYWIDGET_H

#include <QWidget>
#include <QTreeWidget>
#include <QTreeWidgetItem>
#include "readwidget.h"
#include "mainwindow.h"

class ReadEnergyWidget : public ReadWidget
{
    Q_OBJECT
public:
    explicit ReadEnergyWidget(MainWindow* m,QWidget *parent = nullptr);

public:
    void Init_items();

    enum EnergyDataType {
        CAP,     // Combined Active Power   组合有功
        PAP,     // Positive Active Power   正向有功
        NAP,     // Negative Active Power   反向有功
        CRP1,    // Combined Reactive Power 1   组合无功1
        CRP2,    // Combined Reactive Power 2   组合无功2
        Q1RP,    // First Quadrant Reactive Power   第一象限无功
        Q2RP,    // Second Quadrant Reactive Power  第二象限无功
        Q3RP,    // Third Quadrant Reactive Power   第三象限无功
        Q4RP,    // Fourth Quadrant Reactive Power  第四象限无功
        PAPP,    // Positive Apparent Power         正向视在电能
        NAPP,    // Negative Apparent Power         反向视在电能
        DCP,     // Disconnect Chain Power          关联电能
        PHASE_A, // Phase A A相
        PHASE_B, // Phase B B相
        PHASE_C, // Phase C C相
        OD,      // Other Data  其他数据
        NUM
    };
    QStringList energyType={"组合有功","正向有功","反向有功","组合无功1","组合无功2","第一象限无功","第二象限无功","第三象限无功","第四象限无功",
                           "正向视在电能","反向视在电能","关联电能","A相","B相","C相","其他数据"};
    QStringList normalList={"总","费率1(尖)","费率2(峰)","费率3(平)","费率4(谷)","费率5","费率6","费率7","费率8","费率9","费率10","费率11","费率12","费率13","费率14","数据块"};
    //关联电能列表
    QStringList dcpList={"关联总电能","正向有功基波电能","反向有功基波总电能","正向有功谐波电能","反向有功谐波电能","铜损有功电能补偿量","铁损有功电能补偿量"};
    //分相列表
    QStringList phaseList={"正向有功","反向有功","组合无功1","组合无功2","第一象限无功","第二象限无功","第三象限无功","第四象限无功",
                          "正向视在电能","反向视在电能","关联电能","正向有功基波电能","反向有功基波总电能","正向有功谐波电能","反向有功谐波电能","铜损有功电能补偿量","铁损有功电能补偿量"};
    //其他数据
    QStringList odList={"剩余电量","透支电量","剩余金额","透支金额","结算周期组合有功总累计用电量","上1结算周期组合有功累计用电量"};
signals:

private:
    MainWindow* m_main;
};

#endif // READENERGYWIDGET_H
